package uk.co.quidos.gdsap.framework.charge.persistence;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;

import uk.co.quidos.dal.BaseMapper;
import uk.co.quidos.gdsap.framework.charge.persistence.object.GdsapChargeTransactionRecord;

@Repository
public interface GdsapChargeTransactionRecordMapper extends BaseMapper<GdsapChargeTransactionRecord, Long> {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table gdsap_charge_transaction_record
     *
     * @mbggenerated Fri Oct 31 17:19:10 CST 2014
     */
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table gdsap_charge_transaction_record
     *
     * @mbggenerated Fri Oct 31 17:19:10 CST 2014
     */
    int insertSelective(GdsapChargeTransactionRecord record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table gdsap_charge_transaction_record
     *
     * @mbggenerated Fri Oct 31 17:19:10 CST 2014
     */
    GdsapChargeTransactionRecord selectByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table gdsap_charge_transaction_record
     *
     * @mbggenerated Fri Oct 31 17:19:10 CST 2014
     */
    int updateByPrimaryKeySelective(GdsapChargeTransactionRecord record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table gdsap_charge_transaction_record
     *
     * @mbggenerated Fri Oct 31 17:19:10 CST 2014
     */
    int updateByPrimaryKey(GdsapChargeTransactionRecord record);
    
    // 查询GdsapChargeTransactionRecords,根据CondtionVo 内设置的条件
 	List<GdsapChargeTransactionRecord> findPageBreakByCondition(@Param("userName") String userName,@Param("startInsertTime") Date startInsertTime,
 			@Param("endInspectionDate") Date endInspectionDate, @Param("transactionNum") Double transactionNum,
 			@Param("transactionType") Integer transactionType, @Param("recordType") Integer recordType,
 			@Param("purpose") Integer purpose,  RowBounds rb);

 	Integer findNumberByCondition(@Param("userName") String userName,@Param("startInsertTime") Date startInsertTime,
 			@Param("endInspectionDate") Date endInspectionDate, @Param("transactionNum") Double transactionNum,
 			@Param("transactionType") Integer transactionType, @Param("recordType") Integer recordType,
 			@Param("purpose") Integer purpose);
}